export function getToken() {
  return localStorage.token
}

export function setToken(token) {
  return localStorage.token = token
}

export function removeToken() {
  return localStorage.removeItem('token')
}

export function getUsername() {
  // console.log("localStorage.username : " , localStorage.username)
  if ( typeof(sessionStorage.username) === 'undefined') {
    return ''
  } else {
    return sessionStorage.username
  }
}

export function setUsername(username) {
  return sessionStorage.username = username
}

export function removeUsername() {
  return sessionStorage.removeItem('username')
}

export function getId() {
  if ( typeof(sessionStorage.userid) === 'undefined') {
    return ''
  } else {
    return sessionStorage.userid
  }
}

export function setId(userid) {
  return sessionStorage.userid = userid
}

export function removeId() {
  return sessionStorage.removeItem('userid')
}